package com.jzr.bedside.ui.skill

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.google.gson.Gson
import com.jzr.bedside.R
import com.jzr.bedside.base.BaseActivity
import com.jzr.bedside.bean.MediaListBean
import kotlinx.android.synthetic.main.activity_video_play.*

class VideoPlayActivity : BaseActivity() {

    private var data: MediaListBean.DataBean? = null


    override fun getLayoutId(): Int {
        return R.layout.activity_video_play
    }

    override fun attachView() {

    }

    override fun detachView() {

    }

    override fun initView() {

        val strData = intent.getStringExtra("data")
        data = Gson().fromJson<MediaListBean.DataBean>(strData, MediaListBean.DataBean::class.java)

        if (data != null) {
            jzvdStd.setUp(
                data?.url
                , data?.title
            )
        }
    }

}
